From 13ed30288209b2581dcf8ff2e9df5a11ad95f75a Mon Sep 17 00:00:00 2001 From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Mon, 20 Jan 2020 11:01:12 -0700 Subject: [PATCH] remove HAVE_LINUX_HID support from builds. (#465) We haven't used this for some time. --- CMakeLists.txt | 4 ---- GPSBabel.pro | 4 ---- config.h.in | 3 --- configure | 53 +++++++++++++------------------------------------- configure.ac | 23 ---------------------- 5 files changed, 13 insertions(+), 74 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 044e7eb95..673e38abf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -219,10 +219,6 @@ if(MSVC) add_compile_options(/MP -wd4100) endif() -if (CMAKE_SYSTEM_NAME MATCHES "Linux") - add_definitions(-DHAVE_LINUX_HID) -endif() - if (UNIX AND NOT APPLE) set(LIBS ${LIBS} usb-1.0) endif() diff --git a/GPSBabel.pro b/GPSBabel.pro index d08db3e17..13b2cf416 100644 --- a/GPSBabel.pro +++ b/GPSBabel.pro @@ -205,10 +205,6 @@ win32-msvc* { QMAKE_CXXFLAGS += /MP -wd4100 } -linux { - DEFINES += HAVE_LINUX_HID -} - linux|openbsd { LIBS += "-lusb-1.0" } diff --git a/config.h.in b/config.h.in index 1fbfeac3d..b43ed4f51 100644 --- a/config.h.in +++ b/config.h.in @@ -24,9 +24,6 @@ /* Define to 1 if you have the `z' library (-lz). */ #undef HAVE_LIBZ -/* Defined if you have Linux HID */ -#undef HAVE_LINUX_HID - /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H diff --git a/configure b/configure index 82fd0beae..ace1c36df 100755 --- a/configure +++ b/configure @@ -700,6 +700,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -779,6 +780,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1031,6 +1033,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1168,7 +1179,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1321,6 +1332,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -6317,45 +6329,6 @@ esac -case "$target" in #( - *-linux-*) : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux HID interface" >&5 -$as_echo_n "checking for Linux HID interface... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #include - #include - #include - void f(void) { - struct hidraw_devinfo info; - struct hiddev_field_info finfo; - struct hiddev_usage_ref_multi urefm; - struct hiddev_report_info rinfo; - ioctl(0, HIDIOCGRAWINFO, &info); - ioctl(0, HIDIOCGFIELDINFO, &finfo); - ioctl(0, HIDIOCSUSAGES, &urefm); - ioctl(0, HIDIOCSREPORT, &rinfo); - } -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_LINUX_HID 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ;; #( - *) : - ;; -esac - case "$target" in #( *-*-darwin*) : diff --git a/configure.ac b/configure.ac index 520e60582..6ec5e70b8 100644 --- a/configure.ac +++ b/configure.ac @@ -246,29 +246,6 @@ AC_SUBST(USB_CFLAGS) AC_SUBST(OSJEEPS) AC_SUBST(GBSER) -dnl Linux HID support -AS_CASE(["$target"], [*-linux-*], [ - AC_MSG_CHECKING(for Linux HID interface) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - #include - #include - #include - #include - void f(void) { - struct hidraw_devinfo info; - struct hiddev_field_info finfo; - struct hiddev_usage_ref_multi urefm; - struct hiddev_report_info rinfo; - ioctl(0, HIDIOCGRAWINFO, &info); - ioctl(0, HIDIOCGFIELDINFO, &finfo); - ioctl(0, HIDIOCSUSAGES, &urefm); - ioctl(0, HIDIOCSREPORT, &rinfo); - }])], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_LINUX_HID, 1, [Defined if you have Linux HID]), - AC_MSG_RESULT(no)) -]) - AS_CASE(["$target"], [*-*-darwin*], [ ], [ AC_MSG_CHECKING(for reduce relocations) -- 2.30.2